<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<html:html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
<META http-equiv=Pragma content=no-cache>
<META http-equiv=Cache-Control content=no-cache>
<META http-equiv=Expires content=0>
<link rel="stylesheet" href="../../style/css/style.css" type="text/css">
<script type="text/javascript" src="../../style/scripts/util.js"  language="JavaScript"></script>
<script language="javascript1.2">
	function operation(type,xlh){
		if(type+""=="delete"){
			if(!confirm('确定要删除吗？')){
				return;
			}
			window.document.forms[0].ROLEID.value= xlh;
			window.document.forms[0].operationType.value = "delete";
		}
		else if (type+"" == "add") {
			window.document.forms[0].ROLEID.value= xlh;
			window.document.forms[0].operationType.value= "add";
		}
		else if (type+"" == "edit") {
			window.document.forms[0].ROLEID.value= xlh;
			window.document.forms[0].operationType.value= "edit";
		}
		else if (type+"" == "role") {
			window.document.forms[0].ROLEID.value= xlh;
			window.document.forms[0].operationType.value= "role";
		}
	  	window.document.forms[0].submit();
	}

	function mOvr(src,clrOver){
		if (!src.contains(event.fromElement)){ 
			src.bgColor = clrOver; 
		}
	}	
	function mOut(src,clrIn){
		if (!src.contains(event.toElement)){
			src.style.cursor = 'hand'; 
			src.bgColor = clrIn; 
		}
	}

	function getMessage(){
        var errorMsg=document.forms[0].errorFlag.value;
	    if(""!=errorMsg){
	        alert(document.forms[0].errorFlag.value);     
	        document.forms[0].errorFlag.value="" 
	    }
    }
</script>
</head>

<body marginheight="0" marginwidth="0" bottommargin="0" topmargin="0" onLoad="javascript:getMessage();">
<html:form method="post" action="/pages/F09/F0902.do" enctype="multipart/form-data">
<html:hidden property="operationType"/>
<html:hidden property="ROLEID"/>
<html:hidden property="errorFlag"/>
<!--Begin：表单折叠区块1-->
<div id="divDlock_2" class="DivBlock">
<div class="DivHead">
<table width="100%"  border="0" cellpadding="0" cellspacing="0">
	<tr>
	  <td nowrap class="line_wrap" width="37" height="17"><img src="../../style/images/block_unwrap.gif" style="CURSOR: hand;" alt="展开/折叠" onClick="JavaScript:WrapBlock('divDlock_2');"></td>
	  <td nowrap class="line_wrap" width="100%" height="17"><span class="SpanTitle">角色管理</span></td>
	</tr>
</table>
</div>
<!--End：表单折叠区块1-->
<!--Begin：表单按钮及提示区-->
<div class="DivTail" style="text-align:right">
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="left">
    <input type="button" name="Submit1" class="MyButton" value="新增" onClick="javascript:operation('add','');">
    </td>
    <td align="right">&nbsp;</td>
  </tr>
</table>
</div>
</div>
<!--End：表单按钮及提示区-->
<!--Begin：查询列表-->
<div>
<table id="tbList" width="100%" cellpadding="1" cellspacing="1" border="0" rules="none" class="ListBackground">

	<tr align="center" class="ListTitle" >
		<td width="8%"  align="center">代码</td>
		<td width="24%" align="center">名称</td>				
		<td width="46%" align="center">备注</td>
		<td width="8%"  align="center">编辑</td>
		<td width="8%"  align="center">功能点</td>
		<td width="6%"  align="center">删除</td>
	</tr>
	<logic:present name="F0902ActionForm" property="list">
	<logic:iterate id="rowp" name="F0902ActionForm" property="list">
		<tr class="ListRow1">
				<td class="list_rb" align="center"><bean:write name="rowp" property="CODE"/>&nbsp;</td>
				<td class="list_rb" align="left"  ><bean:write name="rowp" property="NAME"/>&nbsp;</td>
				<td class="list_rb" align="left"  ><bean:write name="rowp" property="NOTES"/>&nbsp;</td>
				<td class="list_rb" align="center"><a href="javascript:operation('edit','<bean:write name='rowp' property='ROLEID'/>');">编辑</a></td>
				<td class="list_rb" align="center"><a href="javascript:operation('role','<bean:write name='rowp' property='ROLEID'/>');">分配</a></td>
				<td class="list_rb" align="center"><a href="javascript:operation('delete','<bean:write name='rowp' property='ROLEID'/>');">删除</a></td>
		</tr>
	</logic:iterate>
	</logic:present>	
</table>
<table align="center" width="100%" height="26" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td colspan="6"><bean:define id="actionFormName" value="F0902ActionForm"/><%@ include file="../../style/pagejsp/pageable.jsp"%></td>
	</tr> 
</table>
</div>
<!--End：查询列表-->
</html:form>
</body>
<script language="javascript" type="text/javascript">
InitForm();
FocusTableRow("tbList",1);
</script>
</html:html>